home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / gcc-lib / i486-unknown-sco3.2v5.0.0elf / 2.6-95q2 / include / oldstyle / stdio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-12  |  6.4 KB  |  192 lines

  1. /*
  2.  *   Portions Copyright (C) 1984-1995 The Santa Cruz Operation, Inc.
  3.  *        All Rights Reserved.
  4.  *
  5.  *    The information in this file is provided for the exclusive use of
  6.  *    the licensees of The Santa Cruz Operation, Inc.  Such users have the
  7.  *    right to use, modify, and incorporate this code into other products
  8.  *    for purposes authorized by the license agreement provided they include
  9.  *    this notice and the associated copyright notice with any such product.
  10.  *    The information in this file is provided "AS IS" without warranty.
  11.  */
  12.  
  13. /*    Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
  14. /*    Portions Copyright (c) 1979 - 1990 AT&T   */
  15. /*      All Rights Reserved   */
  16.  
  17. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF          */
  18. /*    UNIX System Laboratories, Inc.                          */
  19. /*    The copyright notice above does not evidence any        */
  20. /*    actual or intended publication of such source code.     */
  21.  
  22. #ifndef _STDIO_H
  23. #ifndef _PARAMS
  24. #if defined(__STDC__) || defined(__cplusplus)
  25. #define _PARAMS(ARGS) ARGS
  26. #else
  27. #define _PARAMS(ARGS) ()
  28. #endif
  29. #endif /* _PARAMS */
  30. #define _STDIO_H
  31.  
  32. #ident "oldstyle @(#) stdio.h 20.1 94/12/04 "
  33.  
  34. #pragma pack(4)
  35.  
  36.  
  37. #ifndef _SIZE_T
  38. #define _SIZE_T
  39. typedef unsigned int    size_t;
  40. #endif
  41.  
  42. #ifndef _FPOS_T
  43. #define _FPOS_T
  44. typedef long    fpos_t;
  45. #endif
  46.  
  47. #ifndef _WCHAR_T
  48. #define _WCHAR_T
  49. typedef long    wchar_t;
  50. #endif
  51.  
  52. #ifndef _WINT_T
  53. #define _WINT_T
  54. typedef long    wint_t;
  55. #endif
  56.  
  57. #ifndef NULL
  58. #define NULL    0
  59. #endif /* NULL */
  60.  
  61. #ifndef EOF
  62. #define EOF    (-1)
  63. #endif
  64.  
  65. #define SEEK_SET    0
  66. #define SEEK_CUR    1
  67. #define SEEK_END    2
  68.  
  69. #ifndef TMP_MAX
  70. #define TMP_MAX        17576    /* 26 * 26 * 26  */
  71. #endif
  72.  
  73. #define BUFSIZ        1024    /* default buffer size  */
  74.  
  75.  
  76. #if defined(_IBCS2)
  77. #define FOPEN_MAX    60    /* at least this many FILEs available  */
  78. #define _NFILE        60
  79. #else
  80. #define FOPEN_MAX    128
  81. #define _NFILE        128
  82. #endif
  83.  
  84. #if _SHORT_FILENAMES
  85. #define FILENAME_MAX 14        /* _POSIX_NAME_MAX */
  86. #else
  87. #define FILENAME_MAX    255    /* max # of characters in a path name  */
  88. #endif
  89.  
  90. #define _IOFBF        0000    /* full buffered  */
  91. #define _IOLBF        0100    /* line buffered  */
  92. #define _IONBF        0004    /* not buffered  */
  93. #define _IOEOF        0020    /* EOF reached on read  */
  94. #define _IOERR        0040    /* I/O error from system  */
  95.  
  96. #define _IOREAD        0001    /* currently reading  */
  97. #define _IOWRT        0002    /* currently writing  */
  98. #define _IORW        0200    /* opened for reading and writing  */
  99. #define _IOMYBUF    0010    /* stdio malloc()'d buffer  */
  100.  
  101. #define _SBFSIZ        8
  102.  
  103. #define L_ctermid    9
  104. #define L_cuserid    9
  105.  
  106. #define P_tmpdir    "/usr/tmp/"
  107.  
  108. /* Non name space polluting version of above */
  109. #define _P_tmpdir "/usr/tmp/"
  110.  
  111. #define L_tmpnam    (sizeof(_P_tmpdir) + 15)
  112.  
  113.  
  114. #ifndef _FILE
  115. #define _FILE
  116. typedef struct _FILE_    /* must be binary-compatible with old versions  */
  117. {
  118.     int        _cnt;    /* number of available characters in buffer  */
  119.     unsigned char    *_ptr;    /* next character from/to here in buffer  */
  120.     unsigned char    *_base;    /* the buffer (not really)  */
  121.     unsigned char    _flag;    /* the state of the stream  */
  122.     unsigned char    _file;    /* file descriptor  */
  123.     unsigned char    _buf[2];/* micro buffer as a fall-back  */
  124. } FILE;
  125. #endif /* _FILE */
  126.  
  127. extern FILE    _iob[];
  128.  
  129. #define stdin    (&_iob[0])
  130. #define stdout    (&_iob[1])
  131. #define stderr    (&_iob[2])
  132.  
  133. extern FILE    *fopen _PARAMS((const char *, const char *)), *fdopen _PARAMS((int, const char *)), *freopen _PARAMS((const char *, const char *, FILE *)), *popen _PARAMS((const char *, const char *)), *tmpfile();
  134. extern long    ftell _PARAMS((FILE *));
  135. extern void    clearerr _PARAMS((FILE *)), rewind _PARAMS((FILE *)), setbuf _PARAMS((FILE *, char *));
  136. extern char    *ctermid _PARAMS((char *)), *cuserid _PARAMS((char *)), *fgets _PARAMS((char *, int, FILE *)), *gets _PARAMS((char *)), *tempnam _PARAMS((const char *, const char *)), *tmpnam _PARAMS((char *));
  137. extern int    fclose _PARAMS((FILE *)), feof _PARAMS((FILE *)), ferror _PARAMS((FILE *)), fflush _PARAMS((FILE *)), fileno _PARAMS((FILE *)), fread _PARAMS((void *, __SIZE_TYPE__ , __SIZE_TYPE__ , FILE *)), fwrite _PARAMS((const void *, __SIZE_TYPE__ , __SIZE_TYPE__ , FILE *)),
  138.         fseek _PARAMS((FILE *, long int, int)), fgetc _PARAMS((FILE *)), getc _PARAMS((FILE *)), getchar(), getw _PARAMS((FILE *)), pclose _PARAMS((FILE *)),
  139.         putc _PARAMS((int, FILE *)), putchar _PARAMS((int)), printf _PARAMS((const char *, ...)), fprintf _PARAMS((FILE *, const char *, ...)), sprintf _PARAMS((char *, const char *, ...)),
  140.         vprintf _PARAMS((const char *, __gnuc_va_list)), vfprintf _PARAMS((FILE *, const char *, __gnuc_va_list)), vsprintf _PARAMS((char *, const char *, __gnuc_va_list)), fputc _PARAMS((int, FILE *)), putw _PARAMS((int, FILE *)),
  141.         puts _PARAMS((const char *)), fputs _PARAMS((const char *, FILE *)), scanf _PARAMS((const char *, ...)), fscanf _PARAMS((FILE *, const char *, ...)), sscanf _PARAMS((const char *, const char *, ...)),
  142.         setvbuf _PARAMS((FILE *, char *, int, __SIZE_TYPE__ )), system _PARAMS((const char *)), ungetc _PARAMS((int, FILE *));
  143. extern int    snprintf(), vsnprintf(), vfscanf(), vscanf(), vsscanf();
  144. extern void    funflush();
  145. extern wint_t    fgetwc(), fputwc(), getwc(), getwchar(), putwc(), putwchar();
  146. extern wint_t    ungetwc();
  147. extern wchar_t    *fgetws();
  148. extern int    fputws(), fwprintf(), fwscanf(), wprintf(), wscanf(),
  149.         swprintf(), swscanf(), vfwprintf(), vfwscanf(),
  150.         vwprintf(), vwscanf(), vswprintf(), vswscanf();
  151. extern int    getopt _PARAMS((int, char *const *, const char *)), optind, opterr, optopt;
  152. extern char    *optarg;
  153. extern int    nl_fprintf(), nl_printf, nl_sprintf(),
  154.         nl_fscanf(), nl_scanf, nl_sscanf();
  155.  
  156. #ifdef _REENTRANT
  157. extern void    flockfile(), funlockfile();
  158. extern int    ftrylockfile(), getc_unlocked(), getchar_unlocked(),
  159.         putc_unlocked(), putchar_unlocked();
  160. #ifndef lint
  161. #define getc_unlocked(p)    (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++)
  162. #define putc_unlocked(x, p)    (--(p)->_cnt < 0 ? \
  163.                     _flsbuf((unsigned char) (x), (p)) : \
  164.                     (int) (*(p)->_ptr++ = (unsigned char) (x)))
  165. #define getchar_unlocked()    getc_unlocked(stdin)
  166. #define putchar_unlocked(x)    putc_unlocked((x), stdout)
  167. #endif
  168. #endif /* _REENTRANT */
  169.  
  170. #ifndef lint
  171.  
  172. #ifndef _REENTRANT
  173. #define getc(p)    (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++)
  174. #define putc(x, p)    (--(p)->_cnt < 0 ? \
  175.                 _flsbuf((unsigned char) (x), (p)) : \
  176.                 (int) (*(p)->_ptr++ = (unsigned char) (x)))
  177. #define clearerr(p)     ((void) ((p)->_flag &= ~(_IOERR | _IOEOF)))
  178. #endif
  179.  
  180. #define getchar()    getc(stdin)
  181. #define putchar(x)    putc((x), stdout)
  182. #define feof(p)        ((p)->_flag & _IOEOF)
  183. #define ferror(p)    ((p)->_flag & _IOERR)
  184.  
  185. #endif /* lint */
  186.  
  187.  
  188.  
  189. #pragma pack()
  190.  
  191. #endif /* _STDIO_H */
  192.